﻿Public Class frmClock

    Private Sub frmClock_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cdClock.StopClock()

    End Sub

    Private Sub btnStart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click

        cdClock.StartClock()
    End Sub

    Private Sub btnPause_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPause.Click
        cdClock.PauseClock()
    End Sub

    Private Sub btnResume_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnResume.Click
        cdClock.ResumeClock()
    End Sub

    Private Sub btnStop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStop.Click
        cdClock.StopClock()
    End Sub

    Private Sub cdClock_StopClockDigit(ByVal cd As System.String) Handles cdClock.StopClockDigit
        Dim dr As DialogResult = MessageBox.Show("Hết giờ! Chương trình sẽ đóng lại", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
        If (dr = Windows.Forms.DialogResult.Yes) Then
            Me.Close()
        End If
    End Sub
End Class
